$(function () {
    monthTrend();
    flowStructTop();
    shengneiTop();
    guoneiTop();
});


// 月总人数走势
function monthTrend() {
    var data = [
        {name: '2018-01', value: 10577},
        {name: '2017-12', value: 14448},
        {name: '2017-11', value: 11448},
        {name: '2017-10', value: 12345}
    ];

    EchartsUtil.line("monthTrend", data);
}


// 景区实时人流构成TOP
function flowStructTop() {
    var data = [
        {name: '省内', value: 10577},
        {name: '省外', value: 144487},
        {name: '国际', value: 87}
    ];

    EchartsUtil.pie("flowStructTop", data);
}


// 省内top
function shengneiTop() {
    var data = [
        {name: '咸阳', value: 95},
        {name: '宝鸡', value: 90},
        {name: '铜川', value: 80},
        {name: '渭南', value: 70},
        {name: '汉中', value: 60},
        {name: '安康', value: 50},
        {name: '商洛', value: 40},
        {name: '延安', value: 30},
        {name: '榆林', value: 20}
    ];
    var areaName = "西安";

    var option = {
        geo: {
            // left: '20%'
        }
    };

    EchartsUtil.migrateProvince("shengneiTopChart", data, areaName, "in", option);
}


// 国内top
function guoneiTop() {
    var data = [
        {name: '上海', value: 95},
        {name: '广州', value: 90},
        {name: '大连', value: 80},
        {name: '南宁', value: 70},
        {name: '南昌', value: 60},
        {name: '拉萨', value: 50},
        {name: '长春', value: 40},
        {name: '包头', value: 30},
        {name: '重庆', value: 20},
        {name: '常州', value: 10}
    ];
    var areaName = "陕西";

    var option = {
        geo: {
            // left: '10%'
        }
    };

    EchartsUtil.migrateChina("guoneiTopChart", data, areaName, "in", option);
}